import { App } from 'vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { zhCn } from 'element-plus/lib/locale'

import * as ELIcons from '@element-plus/icons-vue'

export default function (app: App): void {
  Object.keys(ELIcons).forEach((key) => {
    app.component(key, (ELIcons as any)[key])
  })
  // 注册element-plus/其他
  app.use(ElementPlus, { size: 'default', locale: zhCn })
}
